package com.ivo.model;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name = "PDM_O_TMPL")
public class Template extends Model
{

	private static final long serialVersionUID = 613370075894848525L;
	//---------------------------------------------------------------------------
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "TMPL_ID")
	private Long templateId;

	@Column(name = "TMPL_NAME", length = 100)
	private String templateName;

	@OneToOne(cascade = { CascadeType.MERGE })
	@JoinColumn(name = "FORM_LAYOUT_FK")
	private DisplayType displayType;

	@Column(name = "COLS")
	private int cols;

	public Long getTemplateId()
	{
		return templateId;
	}

	public void setTemplateId(Long templateId)
	{
		this.templateId = templateId;
	}

	public String getTemplateName()
	{
		return templateName;
	}

	public void setTemplateName(String templateName)
	{
		this.templateName = templateName;
	}

	public DisplayType getDisplayType()
	{
		return displayType;
	}

	public void setDisplayType(DisplayType displayType)
	{
		this.displayType = displayType;
	}

	public int getCols()
	{
		return cols;
	}

	public void setCols(int cols)
	{
		this.cols = cols;
	}

}
